<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/purchase.js" ></script>
<script language="javascript">
  function onstsubmit()
	{
		$('#expressform').modal('hide');	
		$('#attributeform').submit();
	}
</script>
<title>质检处理</title>
<body class="withvernav">
<div class="bodywrapper">
{{include file='/public/orderleft.tpl'}}
<div class="centercontent">
  <div class="pageheader notab">
    <h1 class="pagetitle">质检处理</h1>
    <span class="pagedesc">采购商品到达后，完成贴条码，质检操作<br></span>
    
  </div>
  <!--pageheader-->
  <div id="contentwrapper" class="contentwrapper">
    <div id="basicform" class="subcontent"> 
      <!--搜索栏-->
      <div> </div>
      <div style="clear: both"></div>
      <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
    </div>
    <form class="stdform stdform2" method="get" id="search" action="/purchase/qualityinspection">
      <div class="tableoptions">
       
      
     
      申请时间
        <input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
        -
        <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
       运单号: <input type="text" name="kw" id="kw" class="width200" value="{{$kw}}" placeholder="运单号、工厂订单号、淘宝单号" />
        订单编号: <input type="text" name="kws" id="kws" class="width200" value="{{$kws}}" placeholder="订单编号" />
          状态:<select name="status" id="status">
              <option value="0" {{if $status eq 0}} selected {{/if}}>待质检</option>
              <option value="1" {{if $status eq 1}} selected {{/if}}>质检完成</option>
          </select>
          供应商:
          <select name="supplier" id="supplier" class="selection select2_group" style="width:100px;" >
              <option value="">请选择</option>
              {{foreach from=$factorys item=res key=key}}
              <option value="{{$res.id}}"  {{if $res.id eq $supplier}}selected{{/if}}>{{$res.name}}</option>
              {{/foreach}}
          </select>
         商品编号: <input type="text" name="goodssku" id="goodssku" class="width100" value="{{$goodssku}}" placeholder="SKU" />
          商品标识: <input type="text" name="skucode" id="skucode" class="width100" value="{{$skucode}}" placeholder="唯一识别码" />
          采购人:
          <select name="buyer" id="buyer" class="selection select2_group" style="width:100px;" >
              <option value="">请选择</option>
              {{foreach from=$buyerlist item=res key=key}}
              <option value="{{$res}}"  {{if $res eq $buyer}}selected{{/if}}>{{$res}}</option>
              {{/foreach}}
          </select>
        
        <button class="btn btn-primary" id="searchbtn">Search</button>
        <input type='hidden' name='if_csv' id='if_csv'>
        <input type='hidden' name='isow' id='isow'>
        <input type='hidden' name='isno' id='isno'>
        <input type='hidden' name='que' id='que'>
      </div>
    </form>
    <table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="table-layout: fixed;">
      <thead>
        <tr class="lbbt">
          <td width="3%"  bgcolor="#FEFFF1"><a onClick="allSelect('ppid[]')">全选</a></td>
          <td width="8%" bgcolor="#FEFFF1">订单编号</td>
            <td width="10%" bgcolor="#FEFFF1">商品SKU</td>
<!--            <td  bgcolor="#FEFFF1">运单号</td>
-->          <td  bgcolor="#FEFFF1">预计入库时间</td>
          <td  bgcolor="#FEFFF1">采购人</td>
          <td  bgcolor="#FEFFF1">采购总价</td>
          <td  bgcolor="#FEFFF1">状态</td>
           <td  bgcolor="#FEFFF1">申请时间</td>
          <td  bgcolor="#FEFFF1">订单号</td>
         
          <td width="15%"  bgcolor="#FEFFF1" >操作</td>
        </tr>
      </thead>
      <tbody >
      
      {{foreach from=$orderlist item=li key=key}}
      <tr>
        <td ><input name="ppid[]" type="checkbox" class="none" id="ppid[]" value="{{$li.order_sn}}" /></td>
        <td valign="middle" style="position:relative;"><a href="/purchase/ordermod?id={{$li.id}}&t=show" target="_blank"><font color="#6666FF">{{$li.orderstockid}}</font></a></td>
          <td valign="middle">{{$li.goods_no}}</td>
<!--          <td valign="middle">{{$li.tb_kd}}</td>
-->        <td valign="middle">{{$li.waittime}}</td>
        <td valign="middle">{{$li.createuser}}</td>
        <td style="position:relative;">{{$li.allmoney}}</td>
        <td valign="middle">
        {{if $li.status==1}}申请中{{/if}}
         {{if $li.status==2 && $li.chkflag==0}}待质检{{/if}}
         {{if $li.status==2 && $li.chkflag==1}}质检完成{{/if}}
        </td>
         <td class="cz">{{$li.opertime}}</td>
        <td valign="middle">
        
        
          
       {{$li.ordersn}}
          
           </td>
       
        <td class="cz">
         {{if $li.chkflag==0 && $li.status==2}}
           <span id=sbubtom{{$li.sid}}> 
           <img src="/fuman/images/zjcl.jpg" onClick="confirmzhijian({{$li.id}})" style="cursor:pointer"></span>
         {{/if}}
          <span>
          {{if $li.status == 1}}
          <a href="/purchase/ordermod/{{$li.id}}"><img src='/fuman/images/bj.jpg' width='15' height='16' /> 编辑</a>
          {{/if}}</span>
          <span>
          {{if $li.status == 1}}<a href="javascript:void(0)" onClick="delstocklist({{$li.id}})"><img src="/fuman/images/trash.png" width="15" height="16" /> 删除</a>{{/if}}</span>
          <span>
          
          <a href="/purchase/ordermod?id={{$li.id}}&t=show" target="_blank"><img src="/fuman/images/ckk.png" /></a></span>
                    
        
        </td>
      </tr>
      {{/foreach}}
        </tbody>
      
    </table>
    <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
  </div>
</div>

<!-- 模态框（Modal）显示填写货运号 -->
  <form  method="post" name="saveform" id="saveform" action="/purchase/ajaxbutton?op=savekd">
  <input type="hidden" name="orderid" id="orderid">
  <div class="modal fade" id="showmabangorder" tabindex="-1" role="dialog" aria-labelledby="sshowmabangorder" aria-hidden="true">
    <div class="modal-dialog" style="width:50%;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="sshowmabangorder"> 请填写货运单号  </h4>
        </div>
        <div class="modal-body">
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
            
          <tbody id="showmabangid"></tbody>
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="button" class="btn btn-primary"  onclick="atmangban()"> 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  <!-- /.modal -->
  </form>

</body>
</html>